#include <iostream>

using namespace std;


int main()
{
	int ret =0;
	int ans  =0 ; 
	int _count = 1;
	while(cin>>ret)
	{
		if(ret == 250)
		{
			ans = _count;
		}
		_count++;
	}
	cout<<ans;
	return 0;
}
